123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394 |
- <template>
- <div>
- <!-- 页面头部 -->
- <HomePageHead></HomePageHead>
- <!-- 页面导航 -->
- <HomePageNavigation></HomePageNavigation>
- <!-- 广告一 -->
- <HomeAdvertising :imgurl="adImg1"></HomeAdvertising>
- <!-- 二级导航列表 -->
- <div class="nav2top"></div>
- <div class="nav2">
- <ul class="inner">
- <li class="home">
- {{ title }}
- </li>
- <li class="titleList" v-for="(item, index) in pageData" :key="index">
- <NuxtLink :href="getLinkPath(item)" :title="item.alias">
- <span class="nav2_title">{{ item.alias }}</span>
- </NuxtLink>
- </li>
- </ul>
- </div>
- <div class="nav2btm"></div>
- <!-- 第一层 -->
- <!-- 第一部分 -->
- <div class="part1">
- <div class="inner">
- <div class="part1_left" v-if="pageData[0]">
- <div class="part1_title">
- <h2 class="nav_part1_left">
- <NuxtLink :href="getLinkPath(pageData[0])" v-if="pageData[0]" :title="pageData[0].alias">
- {{ pageData[0].alias }}
- </NuxtLink>
- <em></em>
- </h2>
- </div>
- <div class="part1_content">
- <div class="context_left">
- <div class="top" v-for="(item, index) in pageData[0].data" :key="index">
- <NuxtLink :href="getLinkPathDetail(item)" :title="item.title">
- <img :src="item.imgurl" alt="item.title">
- <span class="title1">{{ item.title }}</span>
- </NuxtLink>
- </div>
- <div class="bottom">
- <div class="bottom_left" v-for="(item, index) in pageData[0].data1" :key="index">
- <NuxtLink :href="getLinkPathDetail(item)" :title="item.title">
- <img :src="item.imgurl" alt="item.title">
- <span class="title2">{{ item.title }}</span>
- </NuxtLink>
- </div>
- </div>
- </div>
- <div class="context_right">
- <ul class="rightContent">
- <li class="context1" v-for="(item, index) in pageData[0].data2" :key="index">
- <NuxtLink :href="getLinkPathDetail(item)" :title="item.title">
- {{ item.title }}
- </NuxtLink>
- </li>
- </ul>
- </div>
- </div>
- </div>
- <div class="part1_right" v-if="pageData[1]">
- <div class="part1_right_title">
- <h2 class="part1_right_title1_active">
- <NuxtLink :href="getLinkPath(pageData[1])" v-if="pageData[1]" :title="pageData[1].alias">
- {{ pageData[1].alias }}
- </NuxtLink>
- <em class="active_bg"></em>
- </h2>
- </div>
- <div class="part1_right_content">
- <div class="part1_right_top11">
- <div class="part1_right_content_top" v-for="(item, index) in pageData[1].data" :key="index">
- <NuxtLink :href="getLinkPathDetail(item)" :title="item.title">
- <img :src="item.imgurl" alt="item.title">
- <span class="content_top_title2">{{ item.title }}</span>
- </NuxtLink>
- </div>
- </div>
- <!-- <div class="part1_right_content_top" v-for="(item, index) in pageData[1].data" :key="index">
- <NuxtLink :href="getLinkPathDetail(item)" :title="item.title">
- <img :src="item.imgurl" alt="item.title">
- <span class="content_top_title2">{{ item.title }}</span>
- </NuxtLink>
- </div> -->
- <ul class="part1_right_content_bottom">
- <li class="content_bottom_list" v-for="(item, index) in pageData[1].data1" :key="index">
- <NuxtLink :href="getLinkPathDetail(item)" :title="item.title">
- {{ item.title }}
- </NuxtLink>
- </li>
- </ul>
- </div>
- </div>
- </div>
- </div>
- <!-- 第二部分 -->
- <div class="part2">
- <div class="inner">
- <div class="part2_left" v-if="pageData[2]">
- <div class="part2_title">
- <h2 class="nav_part2_left">
- <NuxtLink :href="getLinkPath(pageData[2])" v-if="pageData[2]" :title="pageData[2].alias">
- {{ pageData[2].alias }}
- </NuxtLink>
- <em></em>
- </h2>
- </div>
- <div class="part2_content">
- <div class="part2_content_left">
- <ul class="content_a">
- <li class="context111" v-for="(item, index) in pageData[2].data2" :key="index">
- <NuxtLink :href="getLinkPathDetail(item)" :title="item.title">
- {{ item.title }}
- </NuxtLink>
- </li>
- </ul>
- </div>
- <div class="part2_content_right">
- <div class="right_top" v-for="(item, index) in pageData[2].data" :key="index">
- <NuxtLink :href="getLinkPathDetail(item)" :title="item.title">
- <img :src="item.imgurl" alt="item.title">
- <span class="title11">{{ item.title }}</span>
- </NuxtLink>
- </div>
- <div class="right_bottom">
- <div class="bottom_left" v-for="(item, index) in pageData[2].data1" :key="index">
- <NuxtLink :href="getLinkPathDetail(item)" :title="item.title">
- <img :src="item.imgurl" alt="item.title">
- <span class="title22">{{ item.title }}</span>
- </NuxtLink>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="part2_right" v-if="pageData[3]">
- <div class="part2_right_title">
- <h2 class="part2_right_title1_active">
- <NuxtLink :href="getLinkPath(pageData[3])" v-if="pageData[3]" :title="pageData[3].alias">
- {{ pageData[3].alias }}
- </NuxtLink>
- <em class="active_bg11"></em>
- </h2>
- </div>
- <div class="part2_right_content">
- <div class="part2_right_top11">
- <div class="part2_right_content_top" v-for="(item, index) in pageData[3].data" :key="index">
- <NuxtLink :href="getLinkPathDetail(item)" :title="item.title">
- <img :src="item.imgurl" alt="item.title">
- <span class="content_top_title22">{{ item.title }}</span>
- </NuxtLink>
- </div>
- </div>
- <ul class="part2_right_content_bottom">
- <li class="content_bottom_list" v-for="(item, index) in pageData[3].data2" :key="index">
- <NuxtLink :href="getLinkPathDetail(item)" :title="item.title">
- {{ item.title }}
- </NuxtLink>
- </li>
- </ul>
- </div>
- </div>
- </div>
- </div>
- <!-- 广告二 -->
- <HomeAdvertising :imgurl="adImg2"></HomeAdvertising>
- <!-- 第二层 -->
- <div class="part3" v-if="pageData[4]">
- <div class="inner">
- <div class="part3_left">
- <div class="part3_left_top" v-if="pageData[4]">
- <div class="part3_leftTitle">
- <h2 class="part3_left_title">
- <NuxtLink :href="getLinkPath(pageData[4])" v-if="pageData[4]"
- :title="pageData[4].alias">
- {{ pageData[4].alias }}
- </NuxtLink>
- <em></em>
- </h2>
- </div>
- <div class="part3_left_content" v-if="pageData[4]">
- <div class="part3_left_content_top">
- <div class="content_top_left">
- <div class="part3_photo_text" v-for="(item, index) in pageData[4].data"
- :key="index">
- <NuxtLink :href="getLinkPathDetail(item)" :title="item.title">
- <img :src="item.imgurl" alt="item.title">
- <span class="part3_text">{{ item.title }}</span>
- </NuxtLink>
- <span class="littleTips">精选</span>
- </div>
- <ul class="part3_content">
- <li class="part3_content_list" v-for="(item, index) in pageData[4].data1"
- :key="index">
- <NuxtLink :href="getLinkPathDetail(item)" :title="item.title">
- {{ item.title }}
- </NuxtLink>
- </li>
- </ul>
- </div>
- <ul class="content_top_right">
- <li class="content_right_list" v-for="(item, index) in pageData[4].data1"
- :key="index">
- <NuxtLink to="#">
- <div class="part3_time">
- <span class="month">{{ getTime(item.updated_at, 'day', 1) }}</span>
- <span class="xiegang">/</span>
- <span class="day">{{ getTime(item.updated_at, 'month', 1) }}</span>
- </div>
- <div class="time_left_content">
- <NuxtLink :href="getLinkPathDetail(item)" :title="item.title">
- {{ item.title }}
- </NuxtLink>
- </div>
- </NuxtLink>
- </li>
- </ul>
- </div>
- </div>
- </div>
- <div class="part3_left_bottom" v-if="pageData[5] || pageData[6]">
- <div class="part3_leftTitle1">
- <h2 class="part3_left_title" v-if="pageData[5]" @mouseenter="tabsData = 1"
- :class="{ part3_left_title_active: tabsData == 1 }">
- <NuxtLink :href="getLinkPath(pageData[5])" @mouseenter="tabsData = 1"
- :class="{ active: tabsData == 1 }" :title="pageData[5].alias">
- {{ pageData[5].alias }}
- </NuxtLink>
- <em></em>
- </h2>
- <h2 class="part3_left_title" v-if="pageData[6]" @mouseenter="tabsData = 2"
- :class="{ part3_left_title_active: tabsData == 2 }">
- <NuxtLink :href="getLinkPath(pageData[6])" v-if="pageData[6]" @mouseenter="tabsData = 2"
- :class="{ active: tabsData == 2 }" :title="pageData[6].alias">
- {{ pageData[6].alias }}
- </NuxtLink>
- <em></em>
- </h2>
- </div>
- <div class="part3_left_content1" v-if="tabsData == 1">
- <div class="content_bottom_left">
- <div class="content_top" v-for="(item, index) in pageData[5].data" :key="index">
- <NuxtLink :href="getLinkPathDetail(item)" :title="item.title">
- <img :src="item.imgurl" alt="item.title">
- <span class="part3_text">{{ item.title }}</span>
- </NuxtLink>
- </div>
- <div class="content_bottom">
- <div class="content_bottom_1" v-for="(item, index) in pageData[5].data1"
- :key="index">
- <NuxtLink :href="getLinkPathDetail(item)" :title="item.title">
- <img :src="item.imgurl" alt="item.title">
- <span class="part3_text">{{ item.title }}</span>
- </NuxtLink>
- </div>
- </div>
- </div>
- <div class="content_bottom_right">
- <ul class="bottom_content_1">
- <li class="bottom_content_list" v-for="(item, index) in pageData[5].data2"
- :key="index">
- <NuxtLink :href="getLinkPathDetail(item)" :title="item.title">
- {{ item.title }}
- </NuxtLink>
- </li>
- </ul>
- </div>
- </div>
- <div class="part3_left_content1" v-if="tabsData == 2 && pageData[6].alias">
- <div class="content_bottom_left">
- <div class="content_top" v-for="(item, index) in pageData[6].data" :key="index">
- <NuxtLink :href="getLinkPathDetail(item)" :title="item.title">
- <img :src="item.imgurl" alt="item.title">
- <span class="part3_text">{{ item.title }}</span>
- </NuxtLink>
- </div>
- <div class="content_bottom">
- <div class="content_bottom_1" v-for="(item, index) in pageData[6].data1"
- :key="index">
- <NuxtLink :href="getLinkPathDetail(item)" :title="item.title">
- <img :src="item.imgurl" alt="item.title">
- <span class="part3_text">{{ item.title }}</span>
- </NuxtLink>
- </div>
- </div>
- </div>
- <div class="content_bottom_right">
- <ul class="bottom_content_1">
- <li class="bottom_content_list" v-for="(item, index) in pageData[6].data2"
- :key="index">
- <NuxtLink :href="getLinkPathDetail(item)" :title="item.title">
- {{ item.title }}
- </NuxtLink>
- </li>
- </ul>
- </div>
- </div>
- </div>
- </div>
- <div class="part3_right" v-if="pageData[7]">
- <div class="part3_rightTitle">
- <h2 class="part3_right_title">
- <NuxtLink :href="getLinkPath(pageData[7])" v-if="pageData[7]" :title="pageData[7].alias">
- {{ pageData[7].alias }}
- </NuxtLink>
- <em></em>
- </h2>
- <div class="rightMore">
- <NuxtLink to="#">更多》</NuxtLink>
- </div>
- </div>
- <ul class="part3_right_content_top" v-if="pageData[7].data1.length > 0">
- <li class="part3_right_contentlist_top" v-for="(item, index) in pageData[7].data1" :key="index">
- <NuxtLink :href="getLinkPathDetail(item)" :title="item.title">
- <span class="numStyle">{{ index + 1 }}</span>
- {{ item.title }}
- </NuxtLink>
- </li>
- </ul>
- <div class="part3_photo_text_right" v-if="pageData[7].data[0]">
- <NuxtLink :href="getLinkPathDetail(pageData[7].data[0])" :title="pageData[7].data[0].title">
- <span class="part3_text11">{{ pageData[7].data[0].title }}</span>
- <img :src="pageData[7].data[0].imgurl" :alt="pageData[7].data[0].title">
- </NuxtLink>
- </div>
- <ul class="part3_right_content_11" v-if="pageData[7].data2.length > 0">
- <li class="part3_right_contentlist_11" v-for="(item, index) in pageData[7].data2" :key="index">
- <NuxtLink :href="getLinkPathDetail(item)" :title="item.title">
- {{ item.title }}
- </NuxtLink>
- </li>
- </ul>
- <div class="part3_photo_text_right" v-if="pageData[7].data[1]">
- <NuxtLink :href="getLinkPathDetail(pageData[7].data[1])" :title="pageData[7].data[1].title">
- <span class="part3_text11">{{ pageData[7].data[1].title }}</span>
- <img :src="pageData[7].data[1].imgurl" :alt="pageData[7].data[1].title">
- </NuxtLink>
- </div>
- <ul class="part3_right_content_11">
- <li class="part3_right_contentlist_11" v-for="(item, index) in pageData[7].data3" :key="index">
- <NuxtLink :href="getLinkPathDetail(item)" :title="item.title">
- {{ item.title }}
- </NuxtLink>
- </li>
- </ul>
- <div class="part3_photo_text_right" v-if="pageData[7].data[2]">
- <NuxtLink :href="getLinkPathDetail(pageData[7].data[2])" :title="pageData[7].data[2].title">
- <span class="part3_text11">{{ pageData[7].data[2].title }}</span>
- <img :src="pageData[7].data[2].imgurl" :alt="pageData[7].data[2].title">
- </NuxtLink>
- </div>
- <ul class="part3_right_content_11">
- <li class="part3_right_contentlist_11" v-for="(item, index) in pageData[7].data4" :key="index">
- <NuxtLink :href="getLinkPathDetail(item)" :title="item.title">
- {{ item.title }}
- </NuxtLink>
- </li>
- </ul>
- </div>
- </div>
- </div>
- <!-- 页脚部分 -->
- <HomeFoot1></HomeFoot1>
- </div>
- </template>
- <script setup>
- //0.加载页面依赖 start ---------------------------------------->
- import { ref, onMounted } from 'vue';
- //格式化跳转路径 - 标题
- //首页分类栏目标题,不需要考虑外链
- const getLinkPath = (item) => {
- // console.log('item111333',item)
- // return `/${item.url}/1.html`;
- // return `/newsList/${item.cid}?page=1`;
- return `/${item.aLIas_pinyin}/list-1.html`;
- }
- //首页跳转到详情,这里需要考虑外链
- const getLinkPathDetail = (item) => {
- // console.log('item111222', item)
- if (item.islink == 1) {
- return `${item.linkurl}`;
- } else {
- //return `/${item.aLIas_pinyin}/${item.id}`;
- // return `/newsDetail/${item.id}?page=1`
- return `/${item.pinyin}/${item.id}.html`;
- }
- }
- //0.加载页面依赖 end ---------------------------------------->
- //1.获得路由id start ---------------------------------------->
- const route = useRoute();
- //获得当前的完整路径
- const fullPath = route.path;
- //拆分,取出来中间这一段,然后提取数字部分
- const segments = fullPath.split('/');
- const targetSegment = segments[1];
- //let routeId = 11 //排除路径错误可以打开这个
- //const numberPart = targetSegment.match(/\d+$/)?.[0];
- //let routeId = numberPart;
- let routeId;
- //通过导航路径反向查询导航id
- const getRouteId = await requestDataPromise('/web/getWebsiteRoute', {
- method: 'GET',
- query: {
- 'pinyin': targetSegment,
- },
- });
- if (getRouteId.code == 200) {
- routeId = getRouteId.data.category_id
- } else {
- console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
- console.log("错误位置:通过url路径查询导航池id")
- console.log("后端错误反馈:", getRouteId.message)
- console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
- }
- //1.获得路由id end ---------------------------------------->
- //2.页面交互效果 start ---------------------------------------->
- //2.1
- const title = ref("")
- const tabsData = ref(1)
- async function getPageDataTitle() {
- const mkdata = await requestDataPromise('/web/getOneWebsiteCategory', {
- method: 'GET',
- query: {
- 'catid': routeId,
- },
- });
- if (mkdata.code == 200) {
- title.value = mkdata.data.alias;
- } else {
- console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
- console.log("错误位置:获取二级标题")
- console.log("后端错误反馈:", mkdata.message)
- console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
- }
- }
- getPageDataTitle();
- //2.1 新闻图片切换
- const hoverStatus = ref(0)
- const qhPic = function (num) {
- console.log(num)
- hoverStatus.value = num;
- }
- //2.2 选项卡切换
- let showTabs = ref(1)
- let qhtabs = function (number) {
- console.log(number)
- showTabs.value = number
- }
- //2.3 展示广告
- let adImg1 = ref({})
- let adImg2 = ref({})
- let adImg3 = ref({})
- let adImg4 = ref({})
- onMounted(async () => {
- //从客户端获取行政职能部门 加快打开速度
- const { $webUrl, $CwebUrl } = useNuxtApp();
- //广告1
- let url = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=xcw_category_0001`
- const responseAd1 = await fetch(url, {
- headers: {
- 'Content-Type': 'application/json',
- 'Userurl': $CwebUrl,
- 'Origin': $CwebUrl
- }
- });
- const resultAd1 = await responseAd1.json();
- adImg1.value = resultAd1.data[0];
- //广告2
- let url2 = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=xcw_category_0002`
- const responseAd2 = await fetch(url2, {
- headers: {
- 'Content-Type': 'application/json',
- 'Userurl': $CwebUrl,
- 'Origin': $CwebUrl
- }
- });
- const resultAd2 = await responseAd2.json();
- adImg2.value = resultAd2.data[0];
- //广告3
- let url3 = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=xcw_category_0003`
- const responseAd3 = await fetch(url3, {
- headers: {
- 'Content-Type': 'application/json',
- 'Userurl': $CwebUrl,
- 'Origin': $CwebUrl
- }
- });
- const resultAd3 = await responseAd3.json();
- adImg3.value = resultAd3.data[0];
- //广告4
- let url4 = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=xcw_category_0004`
- const responseAd4 = await fetch(url4, {
- headers: {
- 'Content-Type': 'application/json',
- 'Userurl': $CwebUrl,
- 'Origin': $CwebUrl
- }
- });
- const resultAd4 = await responseAd4.json();
- adImg4.value = resultAd4.data[0];
- })
- //2.页面交互效果 end ---------------------------------------->
- //3.渲染页面数据 start ---------------------------------------->
- //3.1 该页面上所有的导航池 转为动态数据
- const pageCategory = ref([]);
- //3.2 该页面上需要渲染的所有数据
- const pageData = ref([
- // { id: 0, data: [], data2: [], title: "", cid: "" },
- // { id: 1, data: [], title: "", cid: "" },
- // { id: 2, data: [], title: "", cid: "" },
- // { id: 3, data: [], title: "", cid: "" },
- // { id: 4, data: [], title: "", cid: "" },
- // { id: 5, data: [], title: "", cid: "" },
- // { id: 6, data: [], title: "", cid: "" },
- // { id: 7, data: [], title: "", cid: "" },
- // { id: 8, data: [], title: "", cid: "" },
- ])
- const navSize = ref("");
- //3.3 获取所有导航
- try {
- const navigateData = await requestDataPromise('/web/getWebsiteModelCategory', {
- method: 'GET',
- query: {
- 'placeid': 1,
- 'pid': routeId,
- 'num': 8
- },
- });
- if (navigateData.code == 200) {
- // 遍历可用的导航池放到页面中
- for (let index in navigateData.data) {
- let data = {
- title: navigateData.data[index].name,
- cid: navigateData.data[index].category_id,
- children_count: navigateData.data[index].children_count,
- alias: navigateData.data[index].alias,
- aLIas_pinyin: targetSegment + "/" + navigateData.data[index].aLIas_pinyin,
- data: [],
- data1: [],
- data2: [],
- data3: [],
- data4: [],
- category_id1: "",
- category_id2: "",
- category_id3: "",
- category_id4: "",
- title1: "",
- title2: "",
- title3: "",
- title4: ""
- };
- if (navigateData.data[index].is_url == 1) {
- // 处理 URL 的逻辑
- } else {
- //每个页面最多8个模块
- pageData.value.push(data);
- }
- }
- //导航池加载完毕,开始申请模块数据
- // await getPageData1();
- // await getPageData2();
- // await getPageData3();
- // await getPageData4();
- // await getPageData5();
- // await getPageData6();
- // await getPageData7();
- // await getPageData8();
- let getJson = [
- // { "parent": routeId + ",0,0", "child": pageData.value[0].cid + ",3,10" },//模块1理论前沿
- // { "parent": routeId + ",0,0", "child": pageData.value[1].cid + ",2,6" },//模块2典型经验
- // { "parent": routeId + ",0,0", "child": pageData.value[2].cid + ",3,10" },//模块3农业天地
- // { "parent": routeId + ",0,0", "child": pageData.value[3].cid + ",2,6" },//模块4美丽乡村
- // { "parent": routeId + ",0,0", "child": pageData.value[4].cid + ",1,10" },//模块5农民之家
- // { "parent": routeId + ",0,0", "child": pageData.value[5].cid + ",3,10" },//模块6农业天地
- // { "parent": routeId + ",0,0", "child": pageData.value[6].cid + ",3,10" },//模块7农村建设
- // { "parent": routeId + ",0,0", "child": pageData.value[7].cid + ",3,13" },//模块8高端资讯
- ]
- for (let i = 0; i < pageData.value.length; i++) {
- if (i == 0) {
- getJson.push({ "parent": routeId + ",0,0", "child": pageData.value[i].cid + ",3,10" });
- } else if (i == 1) {
- getJson.push({ "parent": routeId + ",0,0", "child": pageData.value[i].cid + ",2,6" });
- } else if (i == 2) {
- getJson.push({ "parent": routeId + ",0,0", "child": pageData.value[i].cid + ",3,10" });
- } else if (i == 3) {
- getJson.push({ "parent": routeId + ",0,0", "child": pageData.value[i].cid + ",2,6" });
- } else if (i == 4) {
- getJson.push({ "parent": routeId + ",0,0", "child": pageData.value[i].cid + ",1,10" });
- } else if (i == 5) {
- getJson.push({ "parent": routeId + ",0,0", "child": pageData.value[i].cid + ",3,10" });
- } else if (i == 6) {
- getJson.push({ "parent": routeId + ",0,0", "child": pageData.value[i].cid + ",3,10" });
- } else if (i == 7) {
- getJson.push({ "parent": routeId + ",0,0", "child": pageData.value[i].cid + ",3,13" });
- }
- }
- let jsonString = JSON.stringify(getJson);
- // console.log("jsonString", getJson);
- getPageAllData(jsonString);
- } else {
- console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
- console.log("错误位置:分类页导航池")
- console.log("后端错误反馈:", navigateData.message)
- console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
- }
- } catch (error) {
- console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
- console.log("错误位置:分类页导航渲染阶段")
- console.log("错误:导航池渲染执行接口出错!请检查首页的14的模块的具体执行方法!")
- console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
- }
- async function getPageAllData(jsonString) {
- const mkdata = await requestDataPromise('/web/getWebsiteAllArticle', {
- method: 'GET',
- query: {
- 'id': jsonString
- },
- });
- if (mkdata.code == 200) {
- console.log(778899)
- console.log(mkdata.data)
- //模块1理论前沿
- if (mkdata.data[0].child.imgnum.length > 0) {
- pageData.value[0].data.push(mkdata.data[0].child.imgnum[0]);
- }
- if (mkdata.data[0].child.imgnum.length > 1) {
- pageData.value[0].data1.push(mkdata.data[0].child.imgnum[1]);
- }
- if (mkdata.data[0].child.imgnum.length > 2) {
- pageData.value[0].data1.push(mkdata.data[0].child.imgnum[2]);
- }
- if (mkdata.data[0].child.textnum) {
- pageData.value[0].data2 = mkdata.data[0].child.textnum;
- }
- //模块2典型经验
- if (mkdata.data[1].child.imgnum) {
- pageData.value[1].data = mkdata.data[1].child.imgnum;
- }
- if (mkdata.data[1].child.textnum) {
- pageData.value[1].data1 = mkdata.data[1].child.textnum;
- }
- //模块3农业天地
- if (mkdata.data[2].child.imgnum.length > 0) {
- pageData.value[2].data.push(mkdata.data[2].child.imgnum[0]);
- }
- if (mkdata.data[2].child.imgnum.length > 1) {
- pageData.value[2].data1.push(mkdata.data[2].child.imgnum[1]);
- }
- if (mkdata.data[2].child.imgnum.length > 2) {
- pageData.value[2].data1.push(mkdata.data[2].child.imgnum[2]);
- }
- pageData.value[2].data2 = mkdata.data[2].child.textnum;
- //模块4美丽乡村
- pageData.value[3].data = mkdata.data[3].child.imgnum;
- pageData.value[3].data2 = mkdata.data[3].child.textnum;
- //模块5农民之家
- pageData.value[4].data = mkdata.data[4].child.imgnum;
- for (let i in mkdata.data[4].child.textnum) {
- if (i < 5) {
- pageData.value[4].data1.push(mkdata.data[4].child.textnum[i]);
- } else {
- pageData.value[4].data2.push(mkdata.data[4].child.textnum[i]);
- }
- }
- //模块6农业天地
- if (mkdata.data[5].child.imgnum.length > 0) {
- pageData.value[5].data.push(mkdata.data[5].child.imgnum[0]);
- }
- if (mkdata.data[5].child.imgnum.length > 1) {
- pageData.value[5].data1.push(mkdata.data[5].child.imgnum[1]);
- }
- if (mkdata.data[5].child.imgnum.length > 2) {
- pageData.value[5].data1.push(mkdata.data[5].child.imgnum[2]);
- }
- pageData.value[5].data2 = mkdata.data[5].child.textnum;
- //模块7农村建设
- if (mkdata.data[6].child.imgnum.length > 0) {
- pageData.value[6].data.push(mkdata.data[6].child.imgnum[0]);
- }
- if (mkdata.data[6].child.imgnum.length > 1) {
- pageData.value[6].data1.push(mkdata.data[6].child.imgnum[1]);
- }
- if (mkdata.data[6].child.imgnum.length > 2) {
- pageData.value[6].data1.push(mkdata.data[6].child.imgnum[2]);
- }
- pageData.value[6].data2 = mkdata.data[6].child.textnum;
- //模块8高端资讯
- pageData.value[7].data2 = mkdata.data[7].child.imgnum;
- for (let i in mkdata.data[4].child.textnum) {
- if (i < 7) {
- pageData.value[7].data1.push(mkdata.data[4].child.textnum[i]);
- } else if (i < 9) {
- pageData.value[7].data2.push(mkdata.data[4].child.textnum[i]);
- } else if (i < 11) {
- pageData.value[7].data3.push(mkdata.data[4].child.textnum[i]);
- } else {
- pageData.value[7].data4.push(mkdata.data[4].child.textnum[i]);
- }
- }
- } else {
- ElMessage.error(mkdata.message)
- }
- }
- //获得模块数据
- // async function getPageData(catid, img_num, text_num, modulesNum, childNavNum, childImgNum, childTextNum) {
- // const mkdata = await requestDataPromise('/web/getWebsiteCatidArticle', {
- // method: 'GET',
- // query: {
- // 'catid': catid, //catid
- // 'img_num': img_num, //图片数量
- // 'text_num': text_num, //文字数量
- // 'child_catnum': childNavNum,//子级栏目菜单数量
- // 'child_imgnum': childImgNum,//子栏目展示图片新闻数量
- // 'child_textnum': childTextNum//子栏目展示文字新闻数量
- // },
- // });
- // if (modulesNum == 1) {
- // for (let i in mkdata.data.img) {
- // if (i < 1) {
- // pageData.value[0].data.push(mkdata.data.img[i]);
- // } else {
- // pageData.value[0].data1.push(mkdata.data.img[i]);
- // }
- // }
- // pageData.value[0].data2 = mkdata.data.text;
- // }
- // if (modulesNum == 2) {
- // pageData.value[1].data = mkdata.data.img;
- // pageData.value[1].data1 = mkdata.data.text;
- // }
- // if (modulesNum == 3) {
- // for (let i in mkdata.data.img) {
- // if (i < 1) {
- // pageData.value[2].data.push(mkdata.data.img[i]);
- // } else {
- // pageData.value[2].data1.push(mkdata.data.img[i]);
- // }
- // }
- // pageData.value[2].data2 = mkdata.data.text;
- // }
- // if (modulesNum == 4) {
- // pageData.value[3].data = mkdata.data.img;
- // pageData.value[3].data2 = mkdata.data.text;
- // }
- // //模块5
- // if (modulesNum == 5) {
- // pageData.value[4].data = mkdata.data.img;
- // for (let i in mkdata.data.text) {
- // if (i < 5) {
- // pageData.value[4].data1.push(mkdata.data.text[i]);
- // } else {
- // pageData.value[4].data2.push(mkdata.data.text[i]);
- // }
- // }
- // }
- // if (modulesNum == 6) {
- // for (let i in mkdata.data.img) {
- // if (i < 1) {
- // pageData.value[5].data.push(mkdata.data.img[i]);
- // } else {
- // pageData.value[5].data1.push(mkdata.data.img[i]);
- // }
- // }
- // pageData.value[5].data2 = mkdata.data.text;
- // }
- // if (modulesNum == 7) {
- // for (let i in mkdata.data.img) {
- // if (i < 1) {
- // pageData.value[6].data.push(mkdata.data.img[i]);
- // } else {
- // pageData.value[6].data1.push(mkdata.data.img[i]);
- // }
- // }
- // pageData.value[6].data2 = mkdata.data.text;
- // }
- // //模块8
- // if (modulesNum == 8) {
- // pageData.value[7].data = mkdata.data.img;
- // for (let i in mkdata.data.text) {
- // if (i < 7) {
- // pageData.value[7].data1.push(mkdata.data.text[i]);
- // } else if (i < 9) {
- // pageData.value[7].data2.push(mkdata.data.text[i]);
- // } else if (i < 11) {
- // pageData.value[7].data3.push(mkdata.data.text[i]);
- // } else {
- // pageData.value[7].data4.push(mkdata.data.text[i]);
- // }
- // }
- // }
- // }
- //新农村
- //模块1 理论前沿
- // async function getPageData1() {
- // await getPageData(pageData.value[0].cid, 3, 10, 1, 0, 0, 0);
- // }
- // //模块2 典型经验
- // async function getPageData2() {
- // await getPageData(pageData.value[1].cid, 2, 6, 2, 0, 0, 0);
- // }
- // //模块3 农业天地
- // async function getPageData3() {
- // await getPageData(pageData.value[2].cid, 3, 10, 3, 0, 0, 0);
- // }
- // //模块4 美丽乡村
- // async function getPageData4() {
- // await getPageData(pageData.value[3].cid, 2, 6, 4, 0, 0, 0);
- // }
- // //模块5 农民之家
- // async function getPageData5() {
- // await getPageData(pageData.value[4].cid, 1, 10, 5, 0, 0, 0);
- // }
- // //模块6 农业天地
- // async function getPageData6() {
- // await getPageData(pageData.value[5].cid, 3, 10, 6, 0, 0, 0);
- // }
- // //模块7 农村建设
- // async function getPageData7() {
- // await getPageData(pageData.value[6].cid, 3, 10, 7, 0, 0, 0);
- // }
- // //模块8 高端资讯
- // async function getPageData8() {
- // await getPageData(pageData.value[7].cid, 3, 13, 8, 0, 0, 0);
- // }
- // 注意,为了保持模块的数量,当前固定为8个
- // 所以这里的农业天地,合并了原来是下面的7号模块
- // 而原本是7号模块的地方现在变成了8号模块
- //3.渲染页面数据 end ---------------------------------------->
- //4.设置seo信息 start---------------------------------------->
- //4.1 设置seo信息
- const setData = await requestDataPromise('/web/getWebsiteCategoryHead', {
- method: 'GET',
- query: {
- 'catid': routeId
- },
- });
- if (setData.code == 200) {
- let seoTitle = setData.data.seo_title;
- let seoDescription = setData.data.seo_description;
- let seoKeywords = setData.data.seo_keywords;
- let seoSuffix = setData.data.suffix;
- let seoName = setData.data.website_name;
- useSeoMeta({
- title: seoTitle + "_" + seoSuffix,
- meta: [
- { name: 'description', content: seoDescription + "_" + seoName + "_" + seoSuffix, tagPriority: 10 },
- { name: 'keywords', content: seoKeywords + "_" + seoName + "_" + seoSuffix, tagPriority: 10 }
- ]
- });
- } else {
- console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
- console.log("错误位置:设置分类页面SEO数据")
- console.log("后端错误反馈:", setData.message)
- console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
- }
- //4.设置seo信息 end---------------------------------------->
- //5. 获取日期中单独的年 月 日 start--------------------------->
- function getTime(date, part, digits) {
- const d = new Date(date);
- if (part === 'year') {
- let year = d.getFullYear();
- if (digits === 2) {
- return String(year).slice(-2);
- }
- return year;
- } else if (part === 'month') {
- let month = d.getMonth() + 1;
- if (digits === 2) {
- return String(month).padStart(2, '0');
- }
- if (month < 10) {
- month = '0' + month;
- } else {
- month = month;
- }
- return month;
- } else if (part === 'day') {
- let day = d.getDate();
- if (digits === 2) {
- return String(day).padStart(2, '0');
- }
- return day;
- }
- return null;
- }
- //5. 获取日期中单独的年 月 日 end------------------------------>
- </script>
- <style lang="less" scoped>
- // 一级标题
- .nav1 {
- width: 100%;
- height: 214px;
- background: #fff;
- .inner {
- width: 1200px;
- height: 214px;
- margin: 0 auto;
- .nav1_title {
- width: 1120px;
- height: 214px;
- margin-left: 40px;
- line-height: 217px;
- text-align: center;
- font-family: DingTalk JinBuTi, DingTalk JinBuTi;
- font-weight: 400;
- font-size: 50px;
- color: #6D2512;
- background: url(/_nuxt/public/index/title_bg.png) no-repeat 0;
- }
- }
- }
- .nav2top {
- width: 1250px;
- height: 3px;
- margin: 0 auto;
- background-color: #a01c0e;
- }
- .nav2btm {
- width: 1200px;
- height: 3px;
- margin: 0 auto;
- background-color: #a01c0e;
- }
- .nav2 {
- width: 100%;
- height: 48px;
- background-color: #a01c0e;
- .inner {
- width: 1250px;
- height: 48px;
- line-height: 48px;
- padding: 0 45px;
- margin: 0 auto;
- box-sizing: border-box;
- display: flex;
- // justify-content: space-between;
- .titleList {
- font-family: Microsoft YaHei, Microsoft YaHei;
- font-weight: bold;
- font-size: 14px;
- color: #FFFFFF;
- .nav2_title {
- display: inline-block;
- font-family: Microsoft YaHei, Microsoft YaHei;
- font-weight: bold;
- font-size: 14px;
- color: #FFFFFF;
- }
- a {
- padding: 0 38px;
- color: #FFFFFF;
- border-left: 1px solid #7E1C11;
- }
- //鼠标点击后的样式
- .nav2_title_active {
- display: inline-block;
- font-family: Microsoft YaHei, Microsoft YaHei;
- font-weight: bold;
- font-size: 14px;
- color: #FFFFFF;
- border-bottom: 1px solid #FFFFFF;
- }
- }
- .titleList:hover {
- a {
- color: #a01c0e;
- .nav2_title {
- border-bottom: 1px solid #FFFFFF;
- }
- }
- }
- .home {
- width: 100px;
- font-family: Microsoft YaHei, Microsoft YaHei;
- font-weight: bold;
- font-size: 14px;
- color: #F8ECD2;
- }
- }
- }
- //第一部分
- .part1 {
- width: 100%;
- height: 585px;
- margin-top: 35px;
- .inner {
- width: 1200px;
- margin: 0 auto;
- .part1_left {
- float: left;
- width: 720px;
- .part1_title {
- width: 720px;
- height: 50px;
- line-height: 50px;
- .nav_part1_left {
- float: left;
- font-family: Microsoft YaHei, Microsoft YaHei;
- font-weight: 400;
- font-size: 20px;
- color: #333333;
- position: relative;
- a {
- color: #333333;
- }
- em {
- display: inline-block;
- width: 8px;
- height: 8px;
- background-color: #a01c0e;
- border-radius: 4px;
- position: absolute;
- top: 5px;
- }
- }
- }
- .part1_content {
- width: 720px;
- margin-top: 20px;
- .context_left {
- float: left;
- width: 350px;
- .top {
- width: 350px;
- img {
- width: 350px;
- height: 230px;
- }
- a .title1 {
- margin-top: 15px;
- width: 350px;
- height: 48px;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
- overflow: hidden;
- text-overflow: ellipsis;
- word-break: break-all;
- font-family: Microsoft YaHei, Microsoft YaHei;
- font-weight: bold;
- font-size: 18px;
- color: #333333;
- }
- }
- .top:hover {
- a .title1 {
- color: #a01c0e;
- }
- }
- .bottom {
- width: 350px;
- margin-top: 25px;
- .bottom_left {
- float: left;
- width: 165px;
- img {
- width: 165px;
- height: 96px;
- }
- a .title2 {
- margin-top: 10px;
- width: 165px;
- height: 48px;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
- overflow: hidden;
- text-overflow: ellipsis;
- word-break: break-all;
- font-family: Microsoft YaHei, Microsoft YaHei;
- font-weight: 400;
- font-size: 18px;
- color: #333333;
- }
- }
- .bottom_left:first-child {
- margin-right: 20px;
- }
- }
- .bottom_left:hover {
- a .title2 {
- color: #a01c0e;
- }
- }
- }
- .context_right {
- float: right;
- width: 350px;
- .rightContent {
- width: 350px;
- height: 230px;
- .context1:nth-child(5n+1) {
- width: 345px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- font-family: Microsoft YaHei, Microsoft YaHei;
- font-weight: bold;
- font-size: 18px;
- color: #333333;
- a {
- color: #333333;
- }
- }
- .context1:nth-child(5n+1):hover a {
- color: #a01c0e;
- }
- .context1 {
- margin-bottom: 27px;
- width: 345px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- font-family: Microsoft YaHei, Microsoft YaHei;
- font-weight: 400;
- font-size: 18px;
- color: #333333;
- a {
- color: #333333;
- }
- }
- .context1:hover a {
- color: #a01c0e;
- }
- }
- }
- }
- }
- .part1_right {
- float: right;
- width: 450px;
- // height: 1000px;
- .part1_right_title {
- width: 450px;
- height: 50px;
- line-height: 50px;
- .part1_right_title1_active {
- float: left;
- margin-right: 40px;
- font-family: Microsoft YaHei, Microsoft YaHei;
- font-weight: 400;
- font-size: 20px;
- color: #333333;
- position: relative;
- a {
- color: #333333;
- }
- .active_bg {
- display: inline-block;
- width: 8px;
- height: 8px;
- background-color: #a01c0e;
- border-radius: 4px;
- position: absolute;
- top: 7px;
- right: -5px;
- }
- }
- .part1_right_title1 {
- float: left;
- margin-right: 40px;
- font-family: Microsoft YaHei, Microsoft YaHei;
- font-weight: 400;
- font-size: 20px;
- color: #999999;
- position: relative;
- a {
- color: #999999;
- }
- }
- }
- .part1_right_content {
- width: 450px;
- // height: 940px;
- margin-top: 20px;
- .part1_right_top11 {
- width: 450px;
- height: 180px;
- position: relative;
- .part1_right_content_top {
- float: left;
- width: 220px;
- height: 180px;
- a img {
- width: 220px;
- height: 130px;
- }
- a .content_top_title2 {
- display: inline-block;
- width: 220px;
- padding: 0 10px;
- box-sizing: border-box;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- font-family: Microsoft YaHei, Microsoft YaHei;
- font-weight: 400;
- font-size: 18px;
- color: #333333;
- margin-top: 10px;
- }
- }
- .part1_right_content_top:hover {
- a .content_top_title2 {
- color: #a01c0e;
- }
- }
- .part1_right_content_top:nth-child(2) {
- margin-left: 10px;
- }
- }
- .part1_right_content_bottom {
- width: 450px;
- height: 300px;
- margin-top: 15px;
- overflow: hidden;
- .content_bottom_list {
- width: 450px;
- height: 22px;
- line-height: 21px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- margin-bottom: 28px;
- font-family: Microsoft YaHei, Microsoft YaHei;
- font-weight: 400;
- font-size: 18px;
- color: #333333;
- a {
- color: #333333;
- }
- }
- .content_bottom_list:hover {
- a {
- color: #a01c0e;
- }
- }
- }
- }
- }
- }
- }
- //第二部分
- .part2 {
- width: 100%;
- overflow: hidden;
- // margin-bottom: 40px;
- .inner {
- width: 1200px;
- margin: 0 auto;
- .part2_left {
- float: left;
- width: 720px;
- .part2_title {
- width: 720px;
- height: 50px;
- line-height: 50px;
- .nav_part2_left {
- float: left;
- width: 100px;
- font-family: Microsoft YaHei, Microsoft YaHei;
- font-weight: 400;
- font-size: 20px;
- color: #333333;
- position: relative;
- a {
- color: #333333;
- }
- em {
- display: inline-block;
- width: 8px;
- height: 8px;
- background-color: #a01c0e;
- border-radius: 4px;
- position: absolute;
- top: 9px;
- right: 6px;
- }
- }
- }
- .part2_content {
- width: 720px;
- margin-top: 20px;
- .part2_content_left {
- float: left;
- width: 350px;
- .content_a {
- width: 350px;
- height: 230px;
- // margin-bottom: 25px;
- .context111:nth-child(5n+1) {
- width: 345px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- font-family: Microsoft YaHei, Microsoft YaHei;
- font-weight: bold;
- font-size: 18px;
- color: #333333;
- a {
- color: #333333;
- }
- }
- .context111 {
- margin-bottom: 27px;
- width: 345px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- font-family: Microsoft YaHei, Microsoft YaHei;
- font-weight: 400;
- font-size: 18px;
- color: #333333;
- a {
- color: #333333;
- }
- }
- .context111:hover a {
- color: #a01c0e;
- }
- }
- }
- .part2_content_right {
- float: right;
- width: 350px;
- height: 480px;
- .right_top {
- width: 350px;
- height: 300px;
- a img {
- width: 350px;
- height: 230px;
- }
- a .title11 {
- margin-top: 15px;
- width: 350px;
- height: 48px;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
- overflow: hidden;
- text-overflow: ellipsis;
- word-break: break-all;
- font-family: Microsoft YaHei, Microsoft YaHei;
- font-weight: bold;
- font-size: 18px;
- color: #333333;
- }
- }
- .right_top:hover {
- color: #a01c0e;
- a .title11 {
- color: #a01c0e;
- }
- }
- .right_bottom {
- width: 350px;
- height: 165px;
- margin-top: 20px;
- .bottom_left {
- float: left;
- width: 165px;
- height: 130px;
- a img {
- width: 165px;
- height: 96px;
- }
- a .title22 {
- margin-top: 10px;
- width: 165px;
- height: 48px;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
- overflow: hidden;
- text-overflow: ellipsis;
- word-break: break-all;
- font-family: Microsoft YaHei, Microsoft YaHei;
- font-weight: 400;
- font-size: 18px;
- color: #333333;
- }
- }
- .bottom_left:hover {
- color: #a01c0e;
- a .title22 {
- color: #a01c0e;
- }
- }
- .bottom_left:first-child {
- margin-right: 20px;
- }
- }
- }
- }
- }
- .part2_right {
- float: right;
- width: 450px;
- // height: 1000px;
- .part2_right_title {
- width: 450px;
- height: 50px;
- line-height: 50px;
- .part2_right_title1_active {
- float: left;
- margin-right: 40px;
- font-family: Microsoft YaHei, Microsoft YaHei;
- font-weight: 400;
- font-size: 20px;
- color: #333333;
- position: relative;
- a {
- color: #333333;
- }
- .active_bg11 {
- display: inline-block;
- width: 8px;
- height: 8px;
- background-color: #a01c0e;
- border-radius: 4px;
- position: absolute;
- top: 7px;
- right: -5px;
- }
- }
- .part2_right_title1 {
- float: left;
- margin-right: 40px;
- font-family: Microsoft YaHei, Microsoft YaHei;
- font-weight: 400;
- font-size: 20px;
- color: #999999;
- position: relative;
- a {
- color: #999999;
- }
- }
- }
- .part2_right_content {
- width: 450px;
- margin-top: 20px;
- .part2_right_top11 {
- width: 450px;
- height: 170px;
- position: relative;
- .part2_right_content_top {
- float: left;
- width: 220px;
- height: 180px;
- a img {
- width: 220px;
- height: 130px;
- }
- a .content_top_title22 {
- display: inline-block;
- width: 220px;
- padding: 0 10px;
- box-sizing: border-box;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- font-family: Microsoft YaHei, Microsoft YaHei;
- font-weight: 400;
- font-size: 18px;
- color: #333333;
- margin-top: 10px;
- }
- }
- .part2_right_content_top:hover {
- a .content_top_title22 {
- color: #a01c0e;
- }
- }
- .part2_right_content_top:nth-child(2) {
- margin-left: 10px;
- }
- }
- .part2_right_content_bottom {
- width: 450px;
- height: 300px;
- margin-top: 20px;
- overflow: hidden;
- .content_bottom_list {
- width: 450px;
- height: 22px;
- line-height: 21px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- margin-bottom: 28px;
- font-family: Microsoft YaHei, Microsoft YaHei;
- font-weight: 400;
- font-size: 18px;
- color: #333333;
- a {
- color: #333333;
- }
- }
- .content_bottom_list:hover {
- a {
- color: #a01c0e;
- }
- }
- }
- }
- }
- }
- }
- //第三部分
- .part3 {
- width: 100%;
- overflow: hidden;
- // height: 1200px;
- margin-top: 35px;
- margin-bottom: 40px;
- .inner {
- width: 1200px;
- height: 1200px;
- background-color: #fff;
- .part3_left {
- float: left;
- .part3_left_top {
- width: 720px;
- overflow: hidden;
- .part3_leftTitle {
- width: 720px;
- height: 50px;
- line-height: 50px;
- .part3_left_title:first-child {
- float: left;
- margin-right: 20px;
- width: 100px;
- height: 50px;
- line-height: 50px;
- position: relative;
- font-family: Microsoft YaHei, Microsoft YaHei;
- font-weight: 400;
- font-size: 20px;
- color: #333333;
- a {
- color: #333333;
- }
- em {
- display: inline-block;
- width: 8px;
- height: 8px;
- background-color: #a01c0e;
- border-radius: 4px;
- position: absolute;
- top: 9px;
- right: 6px;
- }
- }
- .part3_left_title {
- float: left;
- margin-right: 20px;
- width: 100px;
- height: 50px;
- line-height: 50px;
- position: relative;
- font-family: Microsoft YaHei, Microsoft YaHei;
- font-weight: 400;
- font-size: 20px;
- color: #999999;
- a {
- color: #999999;
- }
- // em{
- // display: inline-block;
- // width: 8px;
- // height: 8px;
- // background-color: #a01c0e;
- // border-radius: 4px;
- // position: absolute;
- // top: 9px;
- // right: 6px;
- // }
- }
- }
- .part3_left_content {
- width: 720px;
- margin-top: 20px;
- .part3_left_content_top {
- .content_top_left {
- float: left;
- width: 350px;
- height: 484px;
- .part3_photo_text {
- width: 350px;
- height: 280px;
- position: relative;
- img {
- width: 350px;
- height: 230px;
- }
- .littleTips {
- display: inline-block;
- width: 50px;
- height: 26px;
- line-height: 26px;
- text-align: center;
- background-color: #a01c0e;
- font-family: Microsoft YaHei, Microsoft YaHei;
- font-weight: 400;
- font-size: 16px;
- color: #fff;
- position: absolute;
- top: 0;
- right: 10px;
- }
- .part3_text {
- display: inline-block;
- width: 350px;
- height: 26px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- font-family: Microsoft YaHei, Microsoft YaHei;
- font-weight: bold;
- font-size: 18px;
- color: #333333;
- margin-top: 15px;
- }
- }
- .part3_photo_text:hover {
- .part3_text {
- color: #a01c0e;
- }
- }
- .part3_content {
- width: 350px;
- .part3_content_list:first-child {
- width: 350px;
- height: 25px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- font-family: Microsoft YaHei, Microsoft YaHei;
- font-weight: bold;
- font-size: 18px;
- color: #333333;
- line-height: 22px;
- margin-top: 35px;
- a {
- color: #333333;
- }
- }
- .part3_content_list:first-child:hover {
- a {
- color: #a01c0e;
- }
- }
- .part3_content_list:last-child {
- margin-bottom: 0;
- }
- .part3_content_list {
- width: 350px;
- height: 25px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- font-family: Microsoft YaHei, Microsoft YaHei;
- font-weight: 400;
- font-size: 18px;
- color: #333333;
- line-height: 22px;
- margin-bottom: 27px;
- a {
- color: #333333;
- }
- }
- .part3_content_list:hover {
- a {
- color: #a01c0e;
- }
- }
- }
- }
- .content_top_right {
- float: left;
- width: 350px;
- height: 542px;
- border: 1px solid #D9D9D9;
- margin-left: 20px;
- padding: 30px 25px;
- box-sizing: border-box;
- .content_right_list {
- width: 350px;
- height: 58px;
- line-height: 58px;
- margin-bottom: 48px;
- .part3_time {
- float: left;
- width: 77px;
- height: 58px;
- color: #a01c0e;
- .month {
- font-family: Microsoft YaHei, Microsoft YaHei;
- font-weight: 400;
- font-size: 26px;
- color: #A01C0E;
- line-height: 30px;
- }
- .xiegang {
- font-size: 22px;
- font-weight: 400;
- }
- .day {
- font-family: Microsoft YaHei, Microsoft YaHei;
- font-weight: 400;
- font-size: 16px;
- color: #A01C0E;
- line-height: 19px;
- }
- }
- .time_left_content {
- float: left;
- width: 231px;
- height: 58px;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
- overflow: hidden;
- text-overflow: ellipsis;
- word-break: break-all;
- line-height: 22px;
- padding-top: 12px;
- box-sizing: border-box;
- font-family: Microsoft YaHei, Microsoft YaHei;
- font-weight: 400;
- font-size: 18px;
- color: #333333;
- border-left: 1px solid #D9D9D9;
- padding-left: 22px;
- a {
- color: #333333;
- }
- a:hover {
- color: #a01c0e;
- }
- }
- }
- .content_right_list:hover {
- .time_left_content {
- color: #a01c0e;
- }
- }
- }
- }
- }
- }
- .part3_left_bottom {
- width: 720px;
- margin-top: 25px;
- .part3_leftTitle1 {
- width: 720px;
- height: 50px;
- line-height: 50px;
- margin-bottom: 25px;
- .part3_left_title_active {
- float: left;
- margin-right: 20px;
- width: 100px;
- height: 50px;
- line-height: 50px;
- position: relative;
- font-family: Microsoft YaHei, Microsoft YaHei;
- font-weight: 400;
- font-size: 20px;
- color: #333333;
- a.active {
- color: #333333;
- }
- em {
- display: inline-block;
- width: 8px;
- height: 8px;
- background-color: #a01c0e;
- border-radius: 4px;
- position: absolute;
- top: 9px;
- right: 6px;
- }
- }
- .part3_left_title {
- float: left;
- margin-right: 20px;
- width: 100px;
- height: 50px;
- line-height: 50px;
- position: relative;
- font-family: Microsoft YaHei, Microsoft YaHei;
- font-weight: 400;
- font-size: 20px;
- color: #999999;
- a {
- color: #999999;
- }
- // em{
- // display: inline-block;
- // width: 8px;
- // height: 8px;
- // background-color: #a01c0e;
- // border-radius: 4px;
- // position: absolute;
- // top: 9px;
- // right: 6px;
- // }
- }
- }
- .part3_left_content1 {
- width: 720px;
- .content_bottom_left {
- float: left;
- width: 350px;
- // height: 350px;
- .content_top {
- width: 350px;
- img {
- width: 350px;
- height: 230px;
- }
- .part3_text {
- display: inline-block;
- width: 350px;
- height: 50px;
- line-height: 22px;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
- overflow: hidden;
- text-overflow: ellipsis;
- word-break: break-all;
- margin-top: 15px;
- font-family: Microsoft YaHei, Microsoft YaHei;
- font-weight: bold;
- font-size: 18px;
- color: #333333
- }
- }
- .content_top:hover {
- .part3_text {
- color: #a01c0e;
- }
- }
- .content_bottom {
- width: 350px;
- margin-top: 20px;
- .content_bottom_1 {
- float: left;
- width: 165px;
- img {
- width: 165px;
- height: 96px;
- }
- .part3_text {
- display: inline-block;
- width: 165px;
- height: 44px;
- line-height: 22px;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
- overflow: hidden;
- text-overflow: ellipsis;
- word-break: break-all;
- font-family: Microsoft YaHei, Microsoft YaHei;
- font-weight: 400;
- font-size: 18px;
- color: #333333;
- margin-top: 10px;
- }
- }
- .content_bottom_1:hover {
- .part3_text {
- color: #a01c0e;
- }
- }
- .content_bottom_1:first-child {
- margin-right: 20px;
- }
- }
- }
- .content_bottom_right {
- float: left;
- margin-left: 20px;
- width: 350px;
- .bottom_content_1 {
- width: 350px;
- .bottom_content_list:nth-child(5n+1) {
- font-weight: bold;
- }
- .bottom_content_list {
- width: 350px;
- height: 25px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- font-family: Microsoft YaHei, Microsoft YaHei;
- font-weight: 400;
- font-size: 18px;
- color: #333333;
- line-height: 21px;
- margin-bottom: 25px;
- a {
- color: #333333;
- }
- }
- .bottom_content_list:hover {
- a {
- color: #a01c0e;
- }
- }
- }
- .bottom_content_1:first-child {
- margin-bottom: 20px;
- }
- .bottom_content_1:last-child {
- .bottom_content_list:last-child {
- margin-bottom: 0;
- }
- }
- }
- }
- }
- }
- .part3_right {
- float: right;
- width: 451px;
- .part3_rightTitle {
- width: 451px;
- height: 50px;
- line-height: 50px;
- .part3_right_title:first-child {
- float: left;
- margin-right: 20px;
- width: 100px;
- height: 50px;
- line-height: 50px;
- position: relative;
- font-family: Microsoft YaHei, Microsoft YaHei;
- font-weight: 400;
- font-size: 20px;
- color: #333333;
- a {
- color: #333333;
- }
- em {
- display: inline-block;
- width: 8px;
- height: 8px;
- background-color: #a01c0e;
- border-radius: 4px;
- position: absolute;
- top: 9px;
- right: 6px;
- }
- }
- .part3_right_title {
- float: left;
- margin-right: 20px;
- width: 100px;
- height: 50px;
- line-height: 50px;
- position: relative;
- font-family: Microsoft YaHei, Microsoft YaHei;
- font-weight: 400;
- font-size: 20px;
- color: #999999;
- a {
- color: #999999;
- }
- // em{
- // display: inline-block;
- // width: 8px;
- // height: 8px;
- // background-color: #a01c0e;
- // border-radius: 4px;
- // position: absolute;
- // top: 9px;
- // right: 6px;
- // }
- }
- .rightMore {
- float: right;
- font-family: Microsoft YaHei, Microsoft YaHei;
- font-weight: 400;
- font-size: 12px;
- color: #999999;
- a {
- color: #999999;
- }
- }
- }
- .part3_right_content_top {
- width: 451px;
- height: 325px;
- position: relative;
- margin-top: 20px;
- .part3_right_contentlist_top {
- font-family: Microsoft YaHei, Microsoft YaHei;
- font-weight: 400;
- font-size: 18px;
- color: #333333;
- width: 425px;
- height: 25px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- margin-bottom: 25px;
- a {
- color: #333333;
- }
- .numStyle {
- display: inline-block;
- width: 22px;
- height: 22px;
- background-color: #f6f6f6;
- text-align: center;
- margin-right: 20px;
- font-family: Protest Strike, Protest Strike;
- font-weight: 400;
- font-size: 16px;
- color: #CCCCCC;
- border-radius: 4px;
- }
- }
- .part3_right_contentlist_top:hover {
- color: #a01c0e;
- a {
- color: #a01c0e;
- }
- }
- .part3_right_contentlist_top:nth-child(1) {
- .numStyle {
- background-color: #a01c0e;
- color: #fff;
- }
- }
- .part3_right_contentlist_top:nth-child(2) {
- .numStyle {
- background-color: #FFC62E;
- color: #fff;
- }
- }
- .part3_right_contentlist_top:nth-child(3) {
- .numStyle {
- background-color: #e98008;
- color: #fff;
- }
- }
- .part3_right_contentlist_top:last-child {
- margin-bottom: 10px;
- }
- }
- .part3_photo_text_right {
- width: 451px;
- height: 120px;
- margin-top: 35px;
- margin-bottom: 35px;
- background-color: #f6f3f0;
- .part3_text11 {
- float: left;
- width: 271px;
- height: 96px;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 3;
- overflow: hidden;
- text-overflow: ellipsis;
- word-break: break-all;
- font-family: Microsoft YaHei, Microsoft YaHei;
- font-weight: 400;
- font-size: 18px;
- color: #333333;
- padding: 25px 20px;
- box-sizing: border-box;
- }
- img {
- float: left;
- width: 180px;
- height: 120px;
- }
- }
- .part3_photo_text_right:hover {
- color: #a01c0e;
- .part3_text11 {
- color: #a01c0e;
- }
- }
- .part3_right_content_11 {
- width: 451px;
- height: 70px;
- position: relative;
- .part3_right_contentlist_11 {
- width: 451px;
- height: 25px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- font-family: Microsoft YaHei, Microsoft YaHei;
- font-weight: 400;
- font-size: 18px;
- color: #333333;
- line-height: 21px;
- .erjibiaoti {
- display: inline-block;
- width: 87px;
- height: 24px;
- font-family: Microsoft YaHei, Microsoft YaHei;
- font-weight: 400;
- font-size: 18px;
- color: #A01C0E;
- border-right: #D3D5D8 1px solid;
- margin-right: 10px;
- }
- a {
- color: #333333;
- }
- }
- .part3_right_contentlist_11:hover {
- color: #a01c0e;
- a {
- color: #a01c0e;
- }
- }
- .part3_right_contentlist_11:first-child {
- margin-bottom: 25px;
- }
- }
- }
- }
- }
- </style>
|